#!/usr/bin/python
# -*- coding: utf-8 -*-
from PyQt4.QtGui import QStandardItemModel

from base import BaseHandler

__author__ = 'xiwei'


class OriginHandler(BaseHandler):
    def __init__(self, ui):
        """
            init
        Args:
            ui (UI.App): ui
        """
        BaseHandler.__init__(self, ui)

        self.tree_view = self.ui.treeView_origin

        self.tree_view_model = QStandardItemModel()
        self.tree_view.setModel(self.tree_view_model)

        self.host_edit = self.ui.lineEdit_db_addr_origin
        self.port_edit = self.ui.lineEdit_db_port_origin
        self.type_comb = self.ui.comboBox_db_type_origin
        self.uid_edit = self.ui.lineEdit_db_username_origin
        self.pwd_edit = self.ui.lineEdit_db_password_origin
